<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计算三个数字的大小</title>
</head>
<body>
    <!--  编写一个函数，计算三个数字的大小，按从小到大顺序输出 -->
    <script>
        function minmax(){
        var minNum=arguments[0];
        var maxNum=arguments[0];
        for(var i=0;i<arguments.length;i++){
            if(minNum>arguments[i]){
                minNum=arguments[i]
            }
            if(maxNum<arguments[i]){
                maxNum=arguments[i]
            }
        }
    var zhong;
    var paixu;
    for(var j=0;j<arguments.length;j++){
        if (arguments[j] !== maxNum && arguments[j] !== minNum) {
                    zhong= arguments[j]
                }
            }
        paixu= '' + minNum + zhong + maxNum
            return paixu;
        }
        var num =minmax(15,3,858);
     document.write(num);
    </script>
</body>
</html>